<template>
  <view>
    <u-cell-group :border="false">
      <u-cell title="修改密码" :value="useInfo.userId" @click="goPage('/pages/myPage/editPage/password')" isLink></u-cell>
      <u-cell title="修改支付密码" isLink @click="goPage('/pages/myPage/editPage/payPassword')"></u-cell>
      <u-cell title="绑定支付宝账号" isLink @click="goPage('/pages/myPage/editPage/zhifubaoPage')"></u-cell>
      <!-- <u-cell title="绑定手机号" :value="useInfo.cell" isLink @click="goPage('/pages/myPage/editPage/editPhone')"></u-cell> -->
      <u-cell title="关于我们" isLink @click="goPage('/pages/myPage/editPage/aboutUs')"></u-cell>
      <u-cell title="账户注销" @click="delUser"></u-cell>
    </u-cell-group>
    <u-cell-group :border="false">
      <u-cell
        :border="false"
        title="退出登录"
        titleStyle="background: linear-gradient(180deg, #EE9578 0%, #EB5693 100%);-webkit-background-clip: text; color: transparent;"
        @click="quitLogin"
      ></u-cell>
    </u-cell-group>
  </view>
</template>

<script lang="ts" setup>
import { ref } from "vue";
import { goPage } from "../../utils/commonFn";
// @ts-ignore
import { onShow } from "@dcloudio/uni-app";
const useInfo = ref<any>({
  headUrl: "",
  userId: "",
});

const quitLogin = () => {
  uni.clearStorage();
  uni.switchTab({
    url: "/pages/home/home",
  });
};
const delUser = async () => {
  uni.showModal({
    title: "提示",
    content: "您确定要注销此账号吗？",
    success: async function (res) {
      if (res.confirm) {
        uni.showToast({
          title: "注销成功",
          icon: "success",
          position: "top",
          success() {
            setTimeout(() => {
              quitLogin();
            }, 300);
          },
        });
      }
    },
  });
};
</script>

<style lang="less" scoped>
/deep/.u-cell-group {
  overflow: hidden;
  background: #fff;
}

/deep/ .u-cell-group__wrapper {
  padding: 0rpx 32rpx;
}

/deep/ .u-cell__body {
  padding: 36rpx 0rpx;
}

/deep/ .u-cell__title-text {
  font-size: 30rpx;
  font-family: PingFangSC-Regular, PingFang SC;
  color: #333333;
}

/deep/ .u-cell__value {
  font-size: 28rpx;
  font-weight: 400;
  color: #fff;
}

:deep(.u-line) {
  border-bottom: 1px solid #f3f4f6;
}
</style>
